<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			
			

			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "exam/paperdef";

        $(function() {
            var options = {
                url: prefix + "/list",

				search: false,
		        showExport: false,
				showSearch: false,
                    showPageGo: false,
                    showRefresh: false,
                    showColumns: false,
                    showToggle: false,
                columns: [
				{
					field : 'name', 
					title : '试卷名称',
					sortable: true
				},				
				{
					field : 'remark', 
					title : '试卷说明',
					sortable: true
				},
				/* {
					field : 'cid', 
					title : '试卷类别',
					sortable: true
				}, */
				{
					field : 'status', 
					title : '试卷状态',
					formatter: function(value, row, index) {
						var actions ;
						if(value)  actions='<a class="btn btn-success btn-xs " href="#" >开放</a> ';
						else actions='<a class="btn btn-danger btn-xs " href="#" >关闭</a>';
						return actions;
					}
				},
				{
					field : 'starttime', 
					title : '开始时间',
					sortable: true
				},
				{
					field : 'endtime', 
					title : '结束时间',
					sortable: true
				},
				{
					field : 'duration', 
					title : '考试时长(分钟)',
					sortable: true
				},
				{
					field : 'totalScore', 
					title : '卷面总分',
					sortable: true
				},
				{
					field : 'passScore', 
					title : '及格分数',
					sortable: true
				},
				{
					field : 'papertype', 
					title : '试卷类型',
					formatter: function(value, row, index) {
						var actions ;
						if(value)  actions='<a class="btn btn-success btn-xs " href="#" >随机</a> ';
						else actions='<a class="btn btn-danger btn-xs " href="#" >固定</a>';
						return actions;
					}
				}]
            };
            $.table.init(options);
        });

    </script>
</body>
</html>